home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / inet / internet-drafts / draft-crocker-stif-00.txt < prev    next >
Text File  |  1993-06-16  |  33KB  |  821 lines

  1.  
  2.  
  3. Internet Draft                STIF            (Expiration:  3/94)
  4.  
  5.  
  6.  
  7.  
  8. D. Crocker
  9. Network Working Group                                  D. Crocker
  10. Internet Draft <STIF>                      Silicon Graphics, Inc.
  11. Expiration:  3/94                                     9 June 1993
  12.                                 
  13.                                 
  14.                                 
  15.                                 
  16.             Structured Text Interchange Format (STIF)
  17.                                 
  18.                                 
  19.                                 
  20.  
  21.  
  22. STATUS OF THIS MEMO
  23.  
  24. This document is an Internet Draft.  Internet Drafts are working
  25. documents of the Internet Engineering Task Force (IETF), its
  26. Areas, and its Working Groups.  (Note that other groups may also
  27. distribute working documents as Internet Drafts).
  28.  
  29. Internet Drafts are draft documents valid for a maximum of six
  30. months. Internet Drafts may be updated, replaced, or obsoleted by
  31. other documents at any time.  It is not appropriate is use
  32. Internet Drafts as reference material or to cite them other than
  33. as a "working draft" or "work in progress."
  34.  
  35. Please check the Internet Draft abstract listing contained in the
  36. IETF Shadow Directories (cd internet-drafts) to learn the current
  37. status of this or any other Internet Draft.
  38.  
  39.  
  40.  
  41. SUMMARY
  42.  
  43. Various applications need to exchange structured information,
  44. such as business-card contact information, bibliographic
  45. citations, and structured forms and replies.  ASN.1 [ISO87] is a
  46. commonly accepted framework for producing binary encoding of
  47. information.  However, Internet data exchanges often take place
  48. in a textual environment, such as electronic mail.  In these
  49. cases, it would be helpful to have conventions for encoding
  50. structured information so that it is entirely legible as text,
  51. but sufficiently structured to allow machine processing.  This
  52. document specifies Structured Text Interchange Format (STIF), a
  53. syntax for encoding attribute/value pairs.  The pairs can be
  54. collected into multi-part sequences and nested sub-lists.  The
  55. syntax provides for user-defined extensions and for references to
  56. data from within sequences and sub-lists.  While STIF can be
  57. generally compared with ASN.1/BER, it attempts much simpler
  58. encoding.  In particular, it is strictly text-based and it does
  59. not provide for specification of a value's data type.
  60.  
  61. Applications for STIF include specialized electronic mail body
  62. parts such as enriched header information, organizational
  63. exchanges such as for communicating personal contact information,
  64. and information/library retrieval descriptions.
  65.  
  66.  
  67.  
  68. TABLE OF CONTENTS
  69. 1.        INTRODUCTION
  70. 2.        STIF SPECIFICATION
  71.      2.1. Support for Additional Character Sets
  72.      2.2. Data Quoting
  73.      2.3. Comment text
  74.      2.4. Line length and line wrapping
  75.      2.5. Lexical Constructs
  76.      2.6. STIF Syntax
  77. 3.        STIF USED IN MIME BODY-PARTS
  78. 4.        STIF Definitions Sent as STIF Encodings
  79. 4.        Examples of STIF Usage
  80.      4.1. Personal contact information entry
  81.      4.2. Reference citations
  82. 5.        REFERENCES
  83. 6.        SECURITY CONSIDERATIONS
  84. 7.        ACKNOWLEDGMENTS
  85. 8.        CONTACT
  86. APPENDIX:  RFC 822 and MIME Rules Used by STIF
  87.  
  88.  
  89.  
  90. 1.  INTRODUCTION
  91.  
  92. Various networking applications require the exchange of
  93. structured information, such as lists of attribute/value pairs.
  94. ASN.1/BER [ISO87] is a commonly accepted framework for producing
  95. binary encoding of such information.  However, Internet data
  96. exchanges often take place in a textual environment, such as
  97. electronic mail.  In these cases, it is helpful to have
  98. conventions for encoding structured information so that it is
  99. entirely legible as text, but sufficiently structured to allow
  100. machine processing.
  101.  
  102. The benefits of textual encoding are counter-intuitive since the
  103. method would seem to be highly inefficient for storage and
  104. processing.  While binary encoding can lead to more compressed
  105. representation and more efficient machine processing, a major
  106. pressure in environments such as the Internet is for easy
  107. interoperability.  Textual encoding tends to make software
  108. development and debugging much easier and therefore leads to a
  109. lower entry cost by independent participants.
  110.  
  111. This document specifies Structured Text Interchange Format
  112. (STIF), a syntax for encoding attribute/value pairs.  The pairs
  113. can be collected into multi-part sequences and nested sub-lists.
  114. The syntax provides for user-defined extensions and for
  115. references to data from within lists and sub-lists.  While STIF
  116. can be generally compared with ASN.1/BER, it attempts much
  117. simpler representation and encoding.  In particular, it is
  118. strictly text-based and it does not provide for specification of
  119. a value's data type.  That is, the semantic "type" of the data,
  120. such as integer or character-string is not explicitly stated in
  121. the representation of the data, itself; further only text
  122. encoding of the data is supported, rather than allowing different
  123. representations for different encoding media.  (While all data
  124. are encoded as character strings, the definitions of specific
  125. data may well define the interpretation of the data as being
  126. integers, character strings, etc.)
  127.  
  128. This specification is of a generic syntax.  Hence, the details of
  129. its application are left to separate specifications.  The benefit
  130. of a core representation model of attribute/value is well-
  131. established, as are the constructs of sequences and nested (sub-)
  132. lists.  These three features compose the simple kernel of STIF
  133. capability.  The basic syntax is kept limited intentionally.
  134.  
  135. The details of the syntax rules, such as choices for delimiters,
  136. were developed from a base of the RFC822 electronic mail
  137. addressing syntax.  RFC822 enjoys wide implementation,
  138. considerably beyond the TCP/IP Internet.  As such, it has a large
  139. population of existing software and technical developers who are
  140. familiar with the syntax.  Further, there is extensive experience
  141. in moving RFC822-encoded objects throughout the EMail Internet.
  142. Hence, it is intended that a syntax which is a (small) derivative
  143. from that of RFC822 will be easiest for the Internet community to
  144. implement and use.
  145.  
  146. Applications for STIF include any exchange which needs a simple,
  147. stuctured format for labeled information.  This includes sending:
  148.        
  149.        -  personal contact information, such as is on a business
  150.            card or a rolodex entry [CROC93],
  151.        
  152.        -  bibliographic references & citations [COHE92],
  153.        
  154.        -  questionnaire forms, and
  155.        
  156.        -  simple query/response transactions.
  157.  
  158.  
  159.  
  160. 2.  STIF SPECIFICATION
  161.  
  162. STIF defines data representation to be lists of attribute value
  163. pairs.  The value portion may be multi-part (a sequence) and sets
  164. of pairs may be aggregated into nested, named sub-sets.  Although
  165. primarily intended for textual representations, STIF permits
  166. inclusion of arbitrary data which are encoded as text.  Also,
  167. text representations are primarily in [US-ASCII], but provision
  168. is made for use of alternate character sets.  For convenience,
  169. STIF also permits data to be simple sequences which are not
  170. labeled by attribute name.  However, this latter form is not
  171. intended as STIF's primary use.
  172.        
  173.        Any BNF rules which are not defined in this
  174.        document are taken from the RFC822 [CROC82] or
  175.        MIME [BORE92] specifications.
  176.  
  177.  
  178. 2.1.   Support for Additional Character Sets
  179.  
  180. STIF syntax is derived from RFC822 and is identical to RFC822's
  181. syntax where possible.  One point of departure is the alteration
  182. of BNF rules which need to support data in the alternate
  183. character set.  For simplicity, only one such rule is used in
  184. higher-level STIF BNF constructs.
  185.        
  186.        Note:  It is possible that some circumstances may
  187.        make it desirable to have multiple additional
  188.        character sets within a single STIF header. STIF
  189.        is not designed to support such fine-grained
  190.        character set requirements and leaves the solution
  191.        to the international community, probably through
  192.        the development of a single, universal character
  193.        set or through a "character-set switching"
  194.        convention which can, itself, be treated by STIF
  195.        (and MIME) as a single character set.
  196.  
  197.  
  198. 2.2.   Data Quoting
  199.  
  200. When dealing with computer systems, a continuing point of
  201. confusion involves the mechanisms that are needed to tell a
  202. system not to interpret an otherwise-special character but,
  203. instead, to treat this normally-special character as regular,
  204. uninterpreted data.
  205.  
  206. RFC 822 specifies a syntax for structured data.  RFC822 also
  207. specifies a way to have special RFC 822 characters treated as
  208. normal data.  SMTP specifies a syntax for data transfer of
  209. messages; it also has a "quoting" mechanism, particularly for the
  210. special terminating period.  MIME specifies a syntax for encoding
  211. RFC822 messages (enhanced by MIME) in a way that allows 8-bit
  212. user data to be transferred, through its transfer-encoding
  213. construct.
  214.  
  215. The RFC 822 quoting mechanism allows specification of arbitrary
  216. US-ASCII 7-bit data, using a "backslash/CHAR" mechanism.  Thus,
  217. its quoting mechanism serves a dual role.  It allows transmission
  218. of characters usually treated as special to RFC822, and it allows
  219. transmission of non-US-ASCII.
  220.  
  221. STIF eliminates this latter function, so that the STIF quoting
  222. mechanism which is otherwise similar to the quoting mechanism of
  223. RFC 822 is to be used _only_ for passing special RFC
  224. 822/MIME/STIF characters as simple data.  The MIME Content-
  225. Transfer-Encoding mechanism is entirely adequate for permitting
  226. arbitrary 8-bit data to be passed over limited data channels.
  227.  
  228. RFC 822 also specifies a string-quoting mechanism.  However, STIF
  229. specifies only a single-character quoting mechanism.  It is valid
  230. in any <eword> without having to surround the eword, itself, with
  231. special quotation marks.
  232.  
  233.  
  234. 2.3.   Comment text
  235.  
  236. As with RFC822, STIF permits text to contain uninterpreted
  237. comments.  The rules for STIF comments are identical to those for
  238. RFC822 and the specification in RFC822 is definitive for STIF.
  239.  
  240. As a convenience, the rules are summarized here:
  241.        
  242.        Comments may appear between lexical constructs.  Comments
  243.        consist of a parenthetical phrase, i.e., a left
  244.        parenthesis, followed by a string of text, followed by a
  245.        right parenthesis.  Comments nest(!).  The comment text
  246.        may contain any character sequence, although the
  247.        characters which are special to comment lexical analysis
  248.        must be quoted.
  249.  
  250.  
  251. 2.4.   Line length and line wrapping
  252.  
  253. STIF permits data text and values of any length.  It enforces no
  254. limitation on the length of data.  However, storage and
  255. transmission environments, such as electronic mail transport,
  256. often do have limitations.  STIF defers all such issues to the
  257. environment in which STIF is operating.
  258.  
  259. For example, if STIF is being processed as a MIME body-part, then
  260. MIME's rules for line-length handling and for the wrapping of
  261. data shall apply.  In particular, MIME provides careful
  262. discussion of the handling of newlines and spaces.
  263.  
  264.  
  265. 2.5.   Lexical Constructs
  266.  
  267. In the manner of RFC822, STIF distinguishes low-level lexical
  268. constructs from the STIF-specific parsing constructs.  The former
  269. define basic character strings.  The latter define sequences of
  270. tokens into the STIF syntax.  STIF's lexical constructs are
  271. defined for STIF-related parsing and are independent of any
  272. additional pre- or post-processing done by other parsers.
  273.  
  274. ephrase           =  1*ascii-word
  275.                             ; An enhanced phrase is a series of
  276.                                words in US-ASCII,
  277.                  /  ( "[" 1*alt-word "]" )
  278.                             ; a series of words in the alternate
  279.                                character set, or
  280.                  /  1*ephrase
  281.                             ; a series of such phrases
  282.  
  283. ascii-word        =  eword
  284.  
  285. alt-word          =  eword
  286.  
  287. eword             =  1*( reg-char / equoted-pair )
  288.                             ; normal data or special characters
  289.                                quoted so as to be treated as
  290.                                normal data
  291.  
  292. reg-char          =  < any ASCII-CHAR except stif-specials and
  293.                      LWSP-char >
  294.  
  295. ASCII-CHAR        =  < Any 7-bit character defined in [US-ASCII]
  296.                      >
  297.  
  298. equoted-pair      =  "\" ( stif-special / LWSP-char )
  299.                             ; equoted-pair is only  for
  300.                                including printable data which
  301.                                has special STIF interpretation.
  302.                             ; Also, quoting is only on a per-
  303.                                character basis, and  not for an
  304.                                entire string.
  305.  
  306. stif-special      =  "\" / "[" / "]" / "<" / ">"
  307.  
  308. LWSP-char         =  < As defined in RFC822 >
  309.  
  310. ascii-word and alt-word appear to be lexically identical.
  311. However, the framing of alt-word between square brackets defines
  312. the enclosed data as being interpreted in the alternate character
  313. set that is in force.
  314.  
  315. Multi-byte alternate character sets are parsed by the lexical
  316. analyzer as a series of single-byte values.  Hence, any multi-
  317. byte character which has a single-byte bit-patter that matches a
  318. stif-special must quote that one byte as an equoted-pair.
  319. Interpretation of the multi-byte sequence as an alternate
  320. character therefore takes place after the byte sequence is
  321. processed by the STIF lexical analyzer.  (The lexical analyzer
  322. will return a string of bytes which is known to be in the
  323. alternate character set but which has not been parsed further.)
  324.        
  325.        NOTE:  While STIF borrows various definitions and
  326.        constructs from RFC822 and is intended for use within a
  327.        MIME environment, it defines its own lexical environment.
  328.        In particular, note that the list of stif-special
  329.        characters contains only the characters that are special
  330.        to STIF.  If a particular STIF value has special meaning,
  331.        such as an RFC822 addr-spec (local@domain), then the
  332.        interpretation of that string and parsing for additional
  333.        special characters takes place after STIF processing
  334.        extracts the string.  In effect, parsing becomes a multi-
  335.        layer process, with each layer having its own rules.
  336.  
  337.  
  338. 2.6.   STIF Syntax
  339.  
  340. STIF is used in document segments that are called parts, to
  341. faciliate their use within MIME body-parts.  A part comprises a
  342. set of headers, similar to the headers in RFC822.  Each header
  343. comprises a set of fields.  Each field contains one "unit" of
  344. data or it defines an aggregation of data.
  345.  
  346. STIF defines a simple syntax for specifying complex
  347. attribute/value data lists, with nesting, sequencing and
  348. structuring.  Nesting permits a field to have sub-aggregations of
  349. attribute/value sets.  Sequencing allows multiple values to be
  350. associated with a single attribute.  Structuring allows a value
  351. to have multiple parts, with an ordered relationship.
  352. (Sequencing can be treated as more than one complete value,
  353. whereas structuring specifies one value in a structured fashion.)
  354. The functioning of structuring could sometimes be accomplished
  355. through the use of additional, smaller attribute/value pairs --
  356. and this would make the syntax more concise and "cleaner" -- but
  357. it is felt that the use of sequencing will allow simpler user
  358. specification.
  359.  
  360. STIF Headers are similar to RFC822 fields and they are formally
  361. specified as a modification to RFC822 BNF.  STIF headers follow
  362. the typical RFC822 rules for wrapping of field data.   The
  363. specific rules for valid STIF-field detailed syntax and semantics
  364. will depend upon the specific STIF header and STIF field
  365. definitions, as provided in separate specifications
  366.  
  367. A STIF Header comprises one or more attribute/value pairs
  368. (fields).  At its simplest an attr-val field attribute/value pair
  369. has a name and a value:
  370.  
  371.   phone: +1 408 246 8253
  372.  
  373. with a list of such information represented as:
  374.  
  375.   phone: +1 408 246 8253; fax: +1 408 249 6205
  376.  
  377. A value actually may be a multi-part sequence so that one value
  378. is structured into an ordered list of sub-values.  For example,
  379. specifying a geographic address usually requires city, region and
  380. country.  While this could be accomplished with three, separate
  381. attribute/value pairs, it is economical to specify them together,
  382. reflecting common practice:
  383.  
  384.   geo: Sunnyvale / CA / US
  385.  
  386. Also, a value may simply be a list of identical values.  In STIF,
  387. this is represented the same way as a sequence of different kinds
  388. of values:
  389.  
  390.   phone: +1 408 246 1234 / +1 408 249 6205
  391.  
  392. Determining whether a sequence specifies values that all are to
  393. be used or values that are to be used as alternatives will depend
  394. upon the semantics of the attribute.  Specifying one value from a
  395. list is accomplished with ones-based indexing, so that the first
  396. number in the above example is specified as phone[1].
  397.  
  398. Lastly, it may be appropriate to aggregate information into a
  399. hierarchy of attribute/value sets (nesting).  A classic example
  400. of this pertains to information about resources at home and those
  401. at work:
  402.  
  403.   Contact < work <phone: +1 415 246 1234>
  404.             home <phone: +1 408 246 8253; fax: +1 408 249 6205> >
  405.  
  406. Choosing among nested alternatives is accomplished with a dotted
  407. notation (nest-ref), so that contact.work.phone refers to the
  408. first number and contact.home.phone refers to the second.  Common
  409. usage may cause some information eventually to change from a
  410. nested notation to one that is called out explicitly.  For
  411. example, reference to a telephone number is an embedded, or core,
  412. requirement.  Distinguishing a telephone number used for
  413. facsimile could easily be accomplished with fax.phone.  However,
  414. specification of facsimile telephone numbers is sufficiently
  415. common that an explicit fax construct may be appropriate.
  416.        
  417.        Simply stated, an attribute/value pair is distinguished
  418.        by  colon separating the pair and a semi-colon between
  419.        pairs.  A nested sub-set is distinguished by surrounding
  420.        the sub-set in an angle-bracket pair, and a sequence is
  421.        distinguished by separating the values with forward
  422.        slashes.
  423.  
  424. Formally, the  generic syntax for STIF headers is:
  425.  
  426. STIF-fields      =   named-fields / sequence
  427.                             ; a set of labeled values, or
  428.                             ; a set of order-dependent,
  429.                                unlabeled values
  430.  
  431. named-fields      =  attr-values / nestings
  432.                             ; one named value, or
  433.                             ; a named set of sub-fields
  434.  
  435. attr-values       =  attribute ":" [ sequence ]
  436.                     *[ ";" attr-values ] [ ";" ]
  437.                             ; An attributes value may be an
  438.                                ordered sequence of values
  439.  
  440. attribute         =  field-name
  441.                             ; same syntax as RFC 822
  442.  
  443. sequence          =  value *( "/" value )
  444.                             ; a sequence of integrated values
  445.  
  446. value             =  ephrase
  447.  
  448. nestings          =  nest-name "<" *named-fields ">"
  449.                             ; nested data may include one or
  450.                                more  nested attribute/value
  451.                                pairs, such  as for
  452.                                distinguishing home phone  number
  453.                                from work phone number  (nesting
  454.                                is infinitely recursive)
  455.  
  456. nest-name         =  field-name
  457.  
  458. attr-el-ref       =  *( nest-name "." )
  459.                     attribute
  460.                     [ "[" el-index "]" ]
  461.                             ; citation format for an element
  462.                             ; nest1.nest2.attribute[index]
  463.  
  464. el-index          =  1*DIGIT
  465.  
  466. DIGIT             =  < as defined in RFC822 >
  467.  
  468. The context in which STIF-based data are defined will determine
  469. any additional encoding, such as distinguishing different sets of
  470. header data.  The following section discussing a framework that
  471. will be used frequently for STIF-based data used within MIME.
  472. When STIF-based data represents a single set of information, then
  473. simply encoding it as a set of STIF-fields is appropriate, with
  474. no special labeling between sets of STIF-fields.
  475.  
  476. The nest-ref rule provides a standard method of referencing data
  477. within STIF fields.  Hence, the example of nesting earlier in
  478. this section would allow reference to a home phone number as
  479. contact.home.phone.
  480.  
  481. header-name should be whatever string is appropriate for
  482. identifying the collection of information in the set of fields.
  483. Within a database context, it will be the value of the primary
  484. key for the entire entry.  When the key is a person's name, care
  485. should be taken to choose a value which is sufficiently
  486. canonical.  For example, a person's name may include various
  487. addenda, such as "Ms." or "Ph.D." or "III" or "Jr.".  When the
  488. name is part of a database tag, such addenda should be omitted,
  489. since they are not likely to be specified during a query.
  490.  
  491. Portions of data are cited using a dotted notation with array
  492. indexing, as appropriate.  The dotted notation walks down the
  493. tree structure of nested data and the ones-based indexing allows
  494. selection from a list of values.  If a reference resolves to a
  495. sub-tree of nestings, rather than a specific attribute, then it
  496. is referring to that entire sub-tree.  If a reference resolves to
  497. a value list, but does not specify an index, then it is referring
  498. to that entire list.
  499.  
  500.  
  501.  
  502. 3.  STIF USED IN MIME BODY-PARTS
  503.  
  504. STIF headers are primarily encoded in US-ASCII text.  When
  505. contained in a MIME message and received by a MIME-aware user
  506. agent that does not understand the semantics of the specific STIF-
  507. based data, it often will still be reasonable for the user agent
  508. to process the body-part as regular Text.  For such STIF-encoded
  509. data, it is therefore reasonable to define the MIME data as a sub-
  510. type of Content-Type:Text.  When the data cannot reasonable be
  511. processed as text, then the body-part should be defined under the
  512. appropriate Content-Type, usually application.  STIF, itself,
  513. does not have an explicit MIME definition.  Rather, it is a
  514. characteristic of certain subtypes.
  515.  
  516. Independent of the top-level Content-Type under which the STIF-
  517. encoded MIME subtype is defined, the Content-Type header may
  518. contain a definition of the alternate character set which is the
  519. body-part. which is used in used in the body-part.   A mechanism
  520. is provided for invoking an "alternate" character set.  Within
  521. MIME, this alternate character set is defined by a "CHARSET="
  522. parameter.
  523.  
  524. Information in the alternate character set generally will need to
  525. be transfer-encoded for cross-net communication.  The standard
  526. MIME Content-Transfer-Encoding mechanism may be used for this.
  527. It is expected that Quoted-Printable will usually be the best
  528. method of ensuring the ability to transfer data, while retaining
  529. the general ability to view US-ASCII-based structured
  530. information, since it will maintain readability of the US-ASCII
  531. information.  However, the choice of Content-Transfer-Encoding
  532. mechanism is entirely the choice of the encoding system.  No
  533. special considerations are required, when encoding STIF-based
  534. data.
  535.  
  536. Support for non-US-ASCII character sets is through the same
  537. "CHARSET=" parameter as is used for MIME's Content-type:Text
  538. mechanism.  For Content-type:Text all text in the body-part is in
  539. the specified character set.  For STIF, the basis for structured
  540. information always is US-ASCII, in order to facilitate any
  541. machine processing which may be appropriate.  However, some
  542. portions of the structured text are allowed to be either in US-
  543. ASCII or in the alternate character set specified with the
  544. "CHARSET=" parameter.  (When STIF is used in non-MIME
  545. environments, some other method must be provided for specifying
  546. the alternate character set.)
  547.  
  548. Changing to a different alternate character set is allowed only
  549. at STIF header boundaries.  Any number of STIF headers may be
  550. aggregated into a single STIF-encoded body-part, but each STIF
  551. header must be complete.
  552.  
  553. A series of STIF-headers may be separated into multiple body-
  554. parts, using the multipart/mixed mechanism.  This permits
  555. redefinition of the alternate character set for STIF.
  556.        
  557.        STIF alternate character sets are the same as the list of
  558.        charsets used in MIME.
  559.  
  560. Thus, a typical STIF-compatible message which uses more than one
  561. alternate character set may exist within an RFC822 and MIME
  562. framework, and have the general form:
  563.  
  564. --Boundary-1
  565. Content-Type:    MULTIPART/MIXED; boundary=Boundary-2
  566.  
  567. --Boundary-2
  568. Content-Type:    TEXT/x-xxx; charset=US-ASCII
  569.  
  570. (initial part of content, with no special character set
  571. requirements)
  572.  
  573. --Boundary-2
  574. Content-Type:    TEXT/x-xxx; charset=ISO-8859-1
  575. Content-Encoding: Quoted-Printable
  576.  
  577. (remaining part of content, with character set supporting some
  578. european languages
  579.  
  580. --Boundary-2--
  581. --Boundary-1
  582. Content-Type:    Text/plain
  583. Content-Encoding: Quoted-Printable
  584.  
  585. (Other content, not using the STIF STRUTEXT content type)
  586.  
  587. --Boundary-1--
  588.  
  589. The specific context in which MIME is used will determine any
  590. surrounding syntax or labeling.  Frequently, it will be
  591. appropriate for STIF data to appear in a series of segments which
  592. are partitioned in a manner similar to headers in RFC822.  That
  593. is, the data will be divided into a series of headers, each with
  594. its own header label.  In such cases, the STIF-based MIME
  595. body-part data format will be:
  596.  
  597. STIF-part         =  *STIF-header
  598.  
  599. STIF-header       =  header-name ":" STIF-fields CRLF
  600.                             ; essentially the same as RFC822
  601.  
  602. header-name       =  field-name
  603.  
  604. field-name        =  < As defined in RFC822>
  605.                             ; Any field name which is defined in
  606.                                RFC 822 or later standards
  607.                                document, and which is not
  608.                                explicitly defined in this
  609.                                specification is automatically
  610.                                incorporated as a STIF Header
  611.                                name, using the RFC 822 syntax,
  612.                                but with any interpretation
  613.                                changes as dictated by STIF's
  614.                                redefinition of the <text> and
  615.                                <phrase> constructs >
  616.  
  617.  
  618.  
  619.  
  620. 4.  STIF Definitions Sent as STIF Encodings
  621.  
  622. Since STIF is intended for the carriage of structured, text-
  623. encoded objects, it should be possible to use STIF to send
  624. descriptions of STIF entitities.  That is, it should be possible
  625. to define specific STIF objects in terms of the STIF syntax.  For
  626. expedience, the definitions of STIF use of STIF syntax is left
  627. for further study.
  628.  
  629.  
  630.  
  631. 4.  Examples of STIF Usage
  632.  
  633. This section offers some examples of possible STIF usage.  These
  634. examples do not represent any sort of formal or accepted use of
  635. the syntax, and are intended merely to be representative.
  636.  
  637.  
  638. 4.1.   Personal contact information entry
  639.  
  640. The following example is taken from PCI [CROC93].
  641.  
  642. It is common for Internet mail headers to contain extensive
  643. information about the author of the mail.  For example:
  644.  
  645. From:    "Ole J. Jacobsen" <ole@Csli.Stanford.EDU>
  646. Or:    +1 415 550-9427 (Home) or +1 415 990-9427 (Cellular)
  647. Direct:   +1 415 962-2515 (Office) +1 415 998-4427 (Pager)
  648. Fax:   +1 415 949-1779 (Interop) +1 415 826-2008 (Home)
  649. X-Comment: Ignore error messages for "ole@radiomail.net"
  650.   Ole J Jacobsen, Editor & Publisher ConneXions--The
  651.        Interoperability Report
  652.   Interop Company, 480 San Antonio Road, Suite 100, Mountain
  653.        View, CA 94040,
  654. Phone: (415) 962-2515  FAX: (415) 949-1779
  655. Email: ole@csli.stanford.edu
  656.  
  657. When encoded as a PCI header, this becomes:
  658.  
  659. Ole J Jacobsen:
  660.   name:    Ole J\. Jacobsen
  661.   email:  ole@csli.stanford.edu;
  662.   work   <title: Editor & Publisher;
  663.           org:   Interop Company;
  664.           dept:  Connexions -- The Interoperability Report;
  665.           street:               480 San Antonio Rd\.\, Suite 100;
  666.           geo:   Mountain View / CA / US;            code: 94040;
  667.           phone: +1 415 962 2515;           fax: +1 415 949 1779>
  668.   home    <phone:                                +1 415 550 9427;  fax: +1 415 826
  669. 2008>
  670.   mobile  <phone:                          +1 415 990 9427; pager  <phone: +1 415
  671. 998 4427> >
  672.   note:   Ignore error messages for "ole@radiomail.net"
  673.  
  674. Note that the entire entry is tagged with a canonical form of the
  675. person's name.  This tag is different from the formal
  676. presentation string for that person's name.  That is, name is
  677. different from the header-name for the header containing the name
  678. field.  Leading and trailing information, such as "Dr." or
  679. "Ph.D." and "Jr." should be removed from the  header-name,  to
  680. faciliate use of this string as a database storage and search
  681. key.
  682.  
  683.  
  684. 4.2.   Reference citations
  685.  
  686. Possibly deriving nomeclature from [COHE92], literature
  687. citations,such as:
  688.  
  689. [BORE92]  Borenstein, N. & Freed, N., "MIME (Multipurpose
  690.           Internet Mail Extensions):  Mechanisms for specifying
  691.           and describing the format of Internet Message Bodies.
  692.           March, 1992, Network Information Center, RFC 1341.
  693.  
  694. [CROC93]  Crocker, D., "Evolving the System", in Internet System
  695.           Handbook, Lynch & Rose (eds.); Reading, Mass., Addison-
  696.           Wesley Publishing Co. (1993)
  697.  
  698. could be represented in STIF as:
  699.  
  700. Borenstein-Freed-MIME-92:
  701.   author:  N. Borenstein, N. Freed;
  702.   title:   MIME \(Multipurpose Internet Mail Extensions\)\:
  703.             Mechanisms for specifying and describing the format
  704.             of Internet Message Bodies;
  705.   date:     1992 / March / ; id: RFC 1341;
  706.   org:      Network Information Center
  707.  
  708. Crocker-Evolving-93:
  709.   author:  D. Crocker;              title: Evolving the System;
  710.   in:      Internet System Handbook;  editor: D. Lynch, M. Rose;
  711.   geo:     Reading / Mass / ;
  712.   org:     Addison-Wesley Publishing Co.;        date: 1993 / /
  713.  
  714.  
  715.  
  716. 5.  REFERENCES
  717.  
  718. [BORE92]    Borenstein, N. & Freed, N., "MIME (Multipurpose
  719.             Internet Mail Extensions):  Mechanisms for
  720.             specifying and describing the format of Internet
  721.             Message Bodies".  March, 1992, Network Information
  722.             Center, RFC 1341.
  723.  
  724. [COHE92]    Cohen, D.  "A Format for E-Mailing Bibliographic
  725.             Records".  July, 1992, Network Information Center,
  726.             RFC 1357.
  727.  
  728. [CROC82]    Crocker, D.,  "Standard for the format of ARPA
  729.             Internet text messages".  August, 1982, Network
  730.             Information Center, RFC 822.
  731.  
  732. [CROC93]    Crocker, D. "Encoding for Personal Contact
  733.             Information (PCI)".  Draft, May 1993.
  734.  
  735. [ISO87]     ISO 8824, Information Processing -- Open Systems
  736.             Interconnection -- Specification of Abstract Syntax
  737.             Notation One (ASN.1), Melbourne, 1987
  738.  
  739. [US-ASCII]  Coded Character Set--7-Bit American Standard Code
  740.             for Information Interchange, ANSI X3.4-1986
  741.  
  742.  
  743.  
  744. 6.  SECURITY CONSIDERATIONS
  745.  
  746. This specification covers data encoded within a portion of an
  747. email message.  It contains addressing and source-identification
  748. information which is not specially authenticated.  No special
  749. provision is made for confidentially of the data nor for
  750. maintaining data integrity.  No other security-related concerns
  751. apply.
  752.  
  753.  
  754.  
  755. 7.  ACKNOWLEDGMENTS
  756.  
  757. The idea for STIF is a direct outgrowth from the efforts of IETF
  758. working groups to extend the functionality of the Internet's mail
  759. service.  This specification resulted from a series of
  760. discussions with Marshall Rose, Ned Freed, Steve Crocker, and
  761. Keith Moore.  Additional review and comments were provided by
  762. Nathaniel Borenstein and Erik M. van der Poel
  763.  
  764.  
  765.  
  766. 8.  CONTACT
  767.  
  768. name:     David H. Crocker;
  769. work      <email:                               dcrocker@sgi.com;
  770.           org:   Silicon Graphics, Inc.;
  771.           street:                        2011 N. Shoreline Blvd.;
  772.           box:   7311;
  773.           geo:   Mountain View / CA / US;       code: 94039-7311;
  774.           phone: +1 415 390 1804;           fax: +1 415 962 8404>
  775.  
  776.  
  777.  
  778. APPENDIX:  RFC 822 and MIME Rules Used by STIF
  779.  
  780. A number of BNF rules used by STIF are taken from RFC822 or MIME.
  781. In order to maintain consistent definition, this document does
  782. not offer explicit definition of those rules, instead referring
  783. the reader to the source specifications.
  784.  
  785. For convenience, a copy of those rules -- taken from the source
  786. documents -- is included here.
  787.        
  788.        THE FOLLOWING RULES ARE NOT TO BE CONSIDERED DEFINITIVE.
  789.        
  790.        IN THE CASE OF INCONSISTENCY BETWEEN THE RULES LISTED
  791.        HERE AND THOSE IN THE SOURCE DOCUMENT -- OR IN LATER
  792.        VERSIONS OF THOSE SOURCE DOCUMENTS -- THE RULES LISTED
  793.        HERE ARE TO BE DEPRECATED.  ONLY THE SOURCE VERSIONS OF
  794.        THE RULES ARE TO BE CONSIDERED CORRECT.
  795.  
  796.  
  797. CHAR        =  <any ASCII character>
  798.                             ; (  0-177,  0.-127.)
  799.  
  800. DIGIT       =  <any ASCII decimal digit>
  801.                             ; ( 60- 71, 48.- 57.)
  802.  
  803. field-name  =  1*<any CHAR, excluding CTLs, SPACE, and ":">
  804.  
  805. LWSP-char   =  SPACE / HTAB
  806.                             ; semantics = SPACE
  807.  
  808.  
  809.  
  810. CTL         =  <any ASCII control character and DEL>
  811.                             ; (  0- 37,  0.- 31.)
  812.                             ; (    177,     127.)
  813.  
  814. SPACE       =  <ASCII SP, space>
  815.                             ; (     40,      32.)
  816.  
  817. HTAB        =  <ASCII HT, horizontal-tab>
  818.                             ; (     11,       9.)
  819.  
  820.  
  821.